<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 10/7/18
 * Time: 8:46 AM
 */
/**
 * @var \yii\web\View $this
 * @var \common\models\db\DocuCommentReply $model
 */

use common\components\tools\Html;
?>

<div class="media">
    <?php echo $model->createdBy->getProfileBoxA($model->createdBy->getAvatarImg(64, 64, ['class' => "media-object img-circle"]), ['class' => "pull-left"]) ?>
    <div class="media-body">
        <h4 class="media-heading">
            <?=$model->createdBy->getProfileBoxA($model->createdBy->profileName) ?>
            <small><?=date("Y-m-d H:i", $model->created_at) ?></small>
            <small class="pull-right">
                <?php if (Yii::$app->user->isGuest): ?>
                    <?= \home\models\FormLogin::getLoginBoxA("请登陆后回复") ?>
                <?php else: ?>
                    <?=Html::button('回复', ['class' => "comment_reply_btn btn btn-xs"]) ?>
                <?php endif; ?>
            </small>
        </h4>
        <?=$model->body ?>
    </div>
</div>
<hr>
